public class Main {
    public static void main(String[] args) {
        // 创建学院
        School school = new School();

        // 创建系
        Department department1 = new Department();
        Department department2 = new Department();
        school.addDepartment(department1);
        school.addDepartment(department2);

        // 创建教师
        Instructor instructor1 = new Instructor();
        Instructor instructor2 = new Instructor();
        department1.addInstructor(instructor1);
        department2.addInstructor(instructor2);

        // 创建课程
        Subject subject1 = new Subject();
        Subject subject2 = new Subject();
        Subject subject3 = new Subject();

        department1.addSubject(subject1);
        department1.addSubject(subject2);
        instructor1.addSubject(subject1);
        instructor1.addSubject(subject2);

        department2.addSubject(subject3);
        instructor2.addSubject(subject3);

        // 创建学生并注册课程
        Student student1 = new Student();
        Student student2 = new Student();

        student1.enrollSubject(subject1);
        student1.enrollSubject(subject2);
        student2.enrollSubject(subject3);

        // 输出信息
        System.out.println("学院的系数: " + school.getDepartments().size());
        System.out.println("第一个系的教师数量: " + department1.getInstructors().size());
        System.out.println("第一个教师教授的课程数量: " + instructor1.getSubjects().size());
        System.out.println("第一个学生选修的课程数量: " + student1.getSubjects().size());
    }
}
